<div class="wrapper wrapper-content" ng-controller="EnergyCategoryMasterController">
	<div class="row">
		<div class="col-lg-12">
			<div class="tabs-container">

				<uib-tabset>
						<uib-tab heading="{{'SETTING.CATEGORY' | translate}}">
							<div class="panel-body" ng-controller="EnergyCategoryController">
								<a ng-click="addCategory()" class="btn btn-primary btn-rounded btn-outline" href=""><i class="fa fa-plus-circle"></i> {{'SETTING.ADD_CATEGORY' | translate}}</a>
								<table id="footable1" class="footable table table-bordered table-hover" data-sort="true" data-page-size="15">
									<thead>
										<tr>
											<th class="text-center" data-type="numeric">{{'SETTING.ID' | translate}}</th>
											<th class="text-center">{{'SETTING.NAME' | translate}}</th>
											<th class="text-center">{{'SETTING.UNIT' | translate}}</th>
											<th class="text-center">{{'SETTING.KGCE' | translate}}</th>
											<th class="text-center">{{'SETTING.KGCO2E' | translate}}</th>
											<th class="text-center">{{'SETTING.ACTION' | translate}}</th>
										</tr>
									</thead>
									<tbody>
										<tr ng-repeat="category in categories">
											<td class="text-center">{{ category.id }}</td>
											<td class="text-center">{{ category.name }}</td>
											<td class="text-center">{{ category.unit_of_measure }}</td>
											<td class="text-center">{{ category.kgce }}</td>
											<td class="text-center">{{ category.kgco2e }}</td>
											<td class="text-center">
												<a class="btn btn-primary btn-rounded btn-xs" ng-click="editCategory(category)" >{{'SETTING.EDIT' | translate}}</a>
												<a ng-click="deleteCategory(category)" class="btn btn-danger btn-rounded btn-xs" >{{'SETTING.DELETE' | translate}}</a>
											</td>
										</tr>
									</tbody>
									<tfoot class="hide-if-no-paging">
										<tr>
											<td colspan="6">
												<ul class="pagination pull-right"></ul>
											</td>
										</tr>
									</tfoot>
								</table>
							</div>
						</uib-tab>
						<uib-tab heading="{{'SETTING.ENERGY_ITEM' | translate}}">
							<div class="panel-body" ng-controller="EnergyItemController">
								<a ng-click="addEnergyItem()" class="btn btn-primary btn-rounded btn-outline" href=""><i class="fa fa-plus-circle"></i> {{'SETTING.ADD_ENERGY_ITEM' | translate}}</a>
								<table class="footable table table-bordered table-hover" data-sort="true" data-page-size="15">
									<thead>
										<tr>
											<th class="text-center" data-type="numeric">{{'SETTING.ID' | translate}}</th>
											<th class="text-center">{{'SETTING.NAME' | translate}}</th>
											<th class="text-center">{{'SETTING.CATEGORY' | translate}}</th>
											<th class="text-center">{{'SETTING.ACTION' | translate}}</th>
										</tr>
									</thead>
									<tbody>
										<tr ng-repeat="energyItem in energyItems">
											<td class="text-center">{{ energyItem.id }}</td>
											<td class="text-center">{{ energyItem.name }}</td>
											<td class="text-center">{{ energyItem.energy_category.name }}</td>
											<td class="text-center">
												<a class="btn btn-primary btn-rounded btn-xs" ng-click="editEnergyItem(energyItem)" >{{'SETTING.EDIT' | translate}}</a>
												<a ng-click="deleteEnergyItem(energyItem)" class="btn btn-danger btn-rounded btn-xs" >{{'SETTING.DELETE' | translate}}</a>
											</td>
										</tr>
									</tbody>
									<tfoot class="hide-if-no-paging">
										<tr>
											<td colspan="6">
												<ul class="pagination pull-right"></ul>
											</td>
										</tr>
									</tfoot>
								</table>
							</div>
						</uib-tab>
					</uib-tabset>
				</div>
			</div>
		</div>
</div>
